/*ShowFindUpdate*/
/*Class contain method for implementing show, find, and update*/

#ifndef SH_FI_UP
#define SH_FI_UP
#include <iomanip>
#include <iostream>
#include <string>
#include <stdexcept>
#include <algorithm>
#include <vector>
//other types
#include "Category.h"
#include "Menu_Item.h"
#include "Recipe.h"
#include "Ingredient.h"
#include "Order.h"
#include "Order_Item.h"

using namespace std;

class ShowFindUpdate {
public:
   //Main Functions
   ShowFindUpdate(); //default constructor
   static void PrintMenuItemChef(vector<Menu_item> TheMIVector, vector<Recipe> TheRecipeVector); //1b. print all menu items sorted by Chef [print item name, ID and Price]
   static void TotalServer(vector<Order> ordersVector, vector<Order_Item> order_itemsVector, vector<Menu_item> menu_itemsVector, int server_id); //2b. Display total sales for a given server
   static void TotalTables(vector<Order> ordersVector, vector<Order_Item> order_itemsVector, vector<Menu_item> menu_itemsVector, int table_id); //2b. Display total sales for a given server
   static void AddItemByOrder(vector<Order_Item> ordersVector, vector<Menu_item> TheMIVector, int order_id, int menu_item_id, int item_quantity, int seat_id); //3b.Add a new menu item using an existing recipe to an existing category
   static void AddMenubyRecipe(vector<Menu_item> &TheMIVector, vector<Recipe> TheRecipeVector, int recipe_id, string category_id,string MenuItemName, double price); //3b.Add a new menu item using an existing recipe to an existing category
   //Support Functions
   static string MenuItemRec_IdToName(vector<Menu_item> TheMIVector, int ComparedRecipeData); //In Menu Item, from RecipeId, return the Recipe Name
   static double MenuItemRec_IdToPrice(vector<Menu_item> TheMIVector, int ComparedRecipeData); //In Menu Item, from RecipeId, return the Recipe Price
   static bool OrderIDVerify(vector<Order_Item> ordersVector, int order_id);
   static int OrderItemIdToQuantity(vector<Order_Item> TheOrderItemVector, int order_Id); //In Order Item, from order_id, return the quantity
   static int OrderItemIdToMenuID(vector<Order_Item> TheOrderItemVector, int order_Id); //In Order Item, from order_id, return the menuitem_id
   static double MenuItemMenu_IdToPrice(vector<Menu_item> TheMIVector, int menuitemID); // Function : In Menu Item, from MenuItemId, return the Recipe Price
   static string MenuItemMenu_IdToName(vector<Menu_item> TheMIVector, int menuitemID); // Function : In Menu Item, from MenuItemId, return the Recipe Price
   static bool RecipeFillDescbyID(vector<Recipe> TheRecipeVector, int RecipeID, Description &MenuDescription); //In Recipe, from RecipemId, fill the name and description
   static int GenerateMenuItemID(vector<Menu_item> TheMIVector);// Generate Menu_ItemID for the new item
   static bool CheckMenuItemID(vector<Menu_item> TheMIVector, int MenuID); //Check existence of Menu_ItemID
   static void PrintRecipe(vector<Recipe> TheRecipeVector, int RecipeID);




    static void PrintMenuItemPrice(vector<Menu_item> mi_vect);	//B1.c print all menu items sorted by price TTL
	static void FindMenuItemPrice(int itemID, vector<Menu_item> menu_items, vector<Order_Item> order_items);
private:

};

#endif //SH_FI_UP
